package com.itheima.enumDemo;

public class test
{
    public static void main(String[] args) {
        A a1=A.X;
        A a2=A.Y;
        System.out.println(a1.name());//Y
        System.out.println(a2.name());//Y
        System.out.println(a1.ordinal());//索引值
        System.out.println(a2.ordinal());//索引值
    }
}
